package com.dcd.service.impl;

import com.dcd.mapper.BrandMapper;
import com.dcd.pojo.Brand;
import com.dcd.service.BrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandServiceImpl implements BrandService {

    @Autowired
    private BrandMapper brandMapper;

    /**
     * 查询前32个热门品牌/根据指定首写字母查询
     *
     * @return
     */
    @Override
    public List<Brand> select_popularity_brand(String brand_first_letter, String whether_only_on_sale) {
        return brandMapper.select_popularity_brand(brand_first_letter, whether_only_on_sale);
    }

    /**
     * 查询指定品牌信息
     * @param brand_id
     * @return
     */
    @Override
    public Brand select_brand_mess_by_id(int brand_id) {
        return brandMapper.select_brand_mess_by_id(brand_id);
    }

    /**
     * 查询所有品牌(购车计算)
     * @return
     */
    @Override
    public List<Brand> select_brandAll() {
        return brandMapper.select_brandAll();
    }


}
